package com.gpipe.tools;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * Created by user on 2017/11/5.
 */
public class BusSubwayConn {

    private String date;
    private String type;//type=1表示公交，type=0表示地铁
    private String station_id_o;
    private String station_name_o;
    private String station_id_d;
    private String station_name_d;
    private String speed;
    private AtomicInteger od_sum;

    public String getKey(){
        return this.date+"|"+this.type+"|"+this.station_id_o+"|"+this.station_name_o+"|"+this.station_id_d+"|"+this.station_name_d+"|"+this.speed;
    }
    public BusSubwayConn(String line){
        String[] cols = line.split("\\|", -1);
        this.date=cols[0];
        this.type=cols[1];
        this.station_id_o=cols[2];
        this.station_name_o=cols[3];
        this.station_id_d=cols[4];
        this.station_name_d=cols[5];
        this.speed=cols[6];
        this.od_sum=new AtomicInteger(Integer.parseInt(cols[7]));
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getStation_id_o() {
        return station_id_o;
    }

    public void setStation_id_o(String station_id_o) {
        this.station_id_o = station_id_o;
    }

    public String getStation_name_o() {
        return station_name_o;
    }

    public void setStation_name_o(String station_name_o) {
        this.station_name_o = station_name_o;
    }

    public String getStation_id_d() {
        return station_id_d;
    }

    public void setStation_id_d(String station_id_d) {
        this.station_id_d = station_id_d;
    }

    public String getStation_name_d() {
        return station_name_d;
    }

    public void setStation_name_d(String station_name_d) {
        this.station_name_d = station_name_d;
    }

    public String getSpeed() {
        return speed;
    }

    public void setSpeed(String speed) {
        this.speed = speed;
    }

    public AtomicInteger getOd_sum() {
        return od_sum;
    }

    public void setOd_sum(AtomicInteger od_sum) {
        this.od_sum = od_sum;
    }
}
